home *** CD-ROM | disk | FTP | other *** search
/ El Mac 8 / El Mac 8.iso / Shareware / Utilities / PowerReplace 4.5.5 / Documentation / 2. FilterFile Doc < prev    next >
Encoding:
Text File  |  1996-03-03  |  5.5 KB  |  162 lines  |  [ttro/ttxt]

  1.  
  2.  
  3.  
  4.  
  5.                        Filter File Documentation
  6.                                                        for PowerReplace 
  7.                                                                         February 26, 1996
  8.  
  9. _________________________________________________________________________
  10.  
  11. PowerReplace Expression:
  12. A PowerReplace Expression (PRExpression) is a text line containing two strings:  first-string and second-string, enclosed by quotation marks and separated by space or tabulation. It means that the first-string will be replaced by the second-string everywhere in a text file. For example, the PRExpression
  13.     "print"   "write"
  14. means replace the word “print” by “write”.
  15. The first-string, if necessary, may contain one special character * in the middle for any indeterminate string. The  following PRExpression
  16.     "%*\n"    ""
  17. means delete all characters of a line beginning with % (delete Tex comment). 
  18.  
  19. A Filter File is a text file containing many PRExpressions after being made through the menu “PowerReplace/File/Make Filter File”.
  20.  
  21. See also the documentation “FAQ” to understand better how to write PRExpression.
  22. See “Version 4.5 readme” for new PRExpression format and some examples.
  23.  
  24. Create New Filter File:
  25. (1) Create a text file using any text editor. Put your own PRExpressions in this file.
  26.  
  27. (2) Select the menu “File/Make Filter File”. The “Make PowerReplace Filter File” window appears. 
  28.  
  29. (3) Click the button “Choose File”, and select the file that you have created at (1). The name of the text file will appear. 
  30.  
  31. (4) Set option boxes in this window. 
  32.      - If the “Extension Name” is empty, you must set the “Delete original file” option on.
  33.      - If the first-string in all PRExpressions is only one character, you can set the “Char Convert Only” option on. It will accelerate converting speed.       
  34.      - Use Balloons Help system for more information.
  35.  
  36. (5) Click the button “Make” to turn this file into filter file. A progress indicator window appears during a short moment.
  37.      - If you want to create other filter file, repeat (1)-(5).
  38.  
  39. (6) Put the new created filter file into the “Filter” folder.
  40.  
  41. (7) Restart the application. This filter file will appear in the menu “Filter” and you can select it for your conversion.
  42. See also the documentation “for beginners” to learn step by step from a complete example.
  43.  
  44. Filter File Format:
  45. To make a text file into filter, PowerReplace adds some resource into it, then changes its creator. That's all. Filter file is still a text file, and you can modify it using any text editor, too!
  46.  
  47. Syntax Summary: (see also “Version 4.5 readme”)
  48. Filter File:
  49.             Filter File-Text after being made through the menu “PowerReplace/File/Make Filter File”
  50. Filter File-Text:  
  51.             line...            (... means repeat many time)
  52. line:
  53.             PRExpression                      or
  54.             comment
  55. comment:
  56.             %string-without-cr\r
  57. PRExpression:
  58.              "first-string"    "second-string"\r   or
  59.     $hex-string1$     "second-string"\r   or
  60.     "first-string"    $hex-string2$  \r   or
  61.     $hex-string1$     $hex-string2$" \r   or
  62.     'pattern'         "second-string"\r   or
  63.     'pattern'         $hex-string2$  \r   
  64. % Sorry, no definition for hex-string1, hex-string1, pattern.
  65. % Any way, there is a small description for pattern in the 
  66. % "Version 4.5 readme" file.
  67. first-string:
  68.             string                         or
  69.             string*string
  70. second-string:
  71.             string
  72. string:
  73.             char...
  74. char:
  75.             normal-char                    or
  76.             special-char
  77. char-without-cr:
  78.             normal-char                or
  79.             special-char (excepte \r)
  80. string-without-cr:
  81.             char-without-cr...
  82. normal-char:
  83.           printable character (except the three following " \ *)
  84. special-char:
  85.     \\                representing                \                       or
  86.     \"                representing                "                       or
  87.     \*                representing                *                       or
  88.        \t    representing    TAB                  or
  89.     \n    representing    LF                      or
  90.     \r    representing    CR
  91.  
  92.  
  93. Index of the filters in the “Filter” folder:
  94. Collection
  95. QP->Mac: (By Rich Brown, Dartmouth College, richard.e.brown@dartmouth.edu)
  96. QuotedPrintable->Mac table. Derived from RFC 1345 and other heuristics.
  97.  
  98. Html->téxt: (By Marc Moliné & G. Han)
  99. Change Html file to readable text file.  Convert first accented letters to Html convention, then delete all anchors.
  100.  
  101. téxt->Html: (By Marc Moliné & G. Han)
  102. Convert accented letters to Html format.
  103.  
  104. téxt->text: (By Marc Moliné)
  105. Convert accented letters to non-accented so a text can be sent by e-mail.
  106.  
  107. Small
  108. DelCComment: 
  109. Remove comment in C++ programme source file. There is two styles: /* */ and //
  110.  
  111. DelResource: 
  112. Remove resource fork of file.
  113.  
  114. Filter->Readme: 
  115. Create “readable” text file for PowerReplace's filter file.
  116.  
  117. StripSpace:
  118. Strip spaces using pattern.
  119.  
  120. Unwarp:
  121. Strip single CR.
  122.  
  123. Char
  124. DeleteCtrlChar:
  125. Delete control characters (0-31) exept TAB and LF.
  126.  
  127. MAJ->min:
  128. Convert uppercase letter to lowercase letter. 
  129.  
  130. min -> MAJ:    
  131. Convert lowercase letter to uppercase letter. The lower accented letter is changed to corresponding uppercase letter without accent.
  132.  
  133. PC->Mac: 
  134. This filter file converts IMB PC text to mac text file.
  135.  
  136. ShowCtrlChar:
  137. Show control characters (0-31).
  138.  
  139. Html
  140.  
  141. Tex
  142. MMat->TeX: 
  143. Change Mathematica Matrix format to Tex format.
  144.  
  145. TeX->Html: 
  146. Convert tex file to HTML format for accented letters.
  147.  
  148. TeX->Text: 
  149. Remove mathematical formule, comment and command in Tex source file, and convert accented letters to readable forme.
  150.  
  151. TeX8->TeX7: 
  152. Convert Tex 8 bits file to Tex 7 bits file.
  153.  
  154. Text->TeX: 
  155. Text file to Tex 7 bits format.
  156.  
  157. _________________________
  158. Guoniu Han
  159. email: guoniu@math.u-strasbg.fr
  160. http://130.79.4.26/~guoniu/mac/
  161. _________________________
  162.